import * as mysql from 'mysql2/promise';


// 创建连接池，设置连接池的参数
const pool = mysql.createPool({
  host: '192.168.3.55',
  user: 'root',
  database: 'test-demo',
  password:"123456",
  waitForConnections: true,
  connectionLimit: 10,
  maxIdle: 10, // max idle connections, the default value is the same as `connectionLimit`
  idleTimeout: 60000, // idle connections timeout, in milliseconds, the default value 60000
  queueLimit: 0,
  enableKeepAlive: true,
  keepAliveInitialDelay: 0,
});

export default pool;

